/**
Date: 2025-08-13
Copyright (c) 2025 Industrial Software Feature Database
*/
import request from '@/utils/request';
import { globalHeaders } from '@/utils/request';
// 区域库列表
export function getRegionList(query) {
  return request({
    url: '/isfd/mongo/regionLibrary/list',
    method: 'post',
    data: query
  });
}

// 保存区域库
export function saveRegion(data) {
  return request({
    url: '/isfd/mongo/regionLibrary/save',
    method: 'post',
    data: data
  });
}

// 删除区域库
export function deleteRegion(data) {
  return request({
    url: '/isfd/mongo/regionLibrary/',
    method: 'delete',
    params: data
  });
}

// 导出
export function exportData(data) {
  return request({
    url: '/isfd/mongo/regionLibrary/export',
    method: 'post',
    data: data,
    responseType: 'blob'
  });
}

// 导入
export function importData(data) {
  return request({
    url: '/isfd/mongo/regionLibrary/import',
    method: 'post',
    data: data
  });
}

// 模板导出
export function downloadRegionTemplate() {
  return request({
    url: `/isfd/mongo/regionLibrary/template`,
    method: 'get',
    responseType: 'blob',
    headers: globalHeaders()
  });
}
